//
//  LKWorkLabelView.m
//  YLHelper
//
//  Created by she1323 on 2018/4/16.
//  Copyright © 2018年 she1323. All rights reserved.
//

#import "LKWorkLabelView.h"
#import "LKWorkListDetailCell.h"


@interface LKWorkLabelView()<UITableViewDataSource,UITableViewDelegate>

@end


@implementation LKWorkLabelView




-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self createTableView];
    }
    return self;
}
-(void)createTableView{
    self.tableview = [LKBaseTableview setTableviewWithFrame:self.bounds style:UITableViewStylePlain registercellClasss:@[@"LKWorkListDetailCell"]];
    self.tableview.delegate = self;
    self.tableview.dataSource = self;
    [self addSubview:self.tableview];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.titleArray.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    LKWorkListDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:@"LKWorkListDetailCell"];
    cell.titleLabel.text = self.titleArray[indexPath.row];
    return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return self.isCustom ? 104/self.titleArray.count : 164/self.titleArray.count;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
}
@end
